

public class CosineFunction extends Function{

	{
		order = 1;
	}

	public double evaluate(double[] vars){
		return Math.cos(children.get(0).evaluate(vars));
	}

	public CosineFunction deepCopy(){
		CosineFunction returner = new CosineFunction();
		for(Node myChild:this.children){
			returner.children.add(myChild.deepCopy());
		}
		for(Node otherChild:returner.children){
			otherChild.parent = returner;
		}
		returner.size = this.size;
		return returner;
	}

	@Override
	public String toString() {
		return "cos( "+this.children.get(0)+" )";
	}
}